<template>
  <view class="page">
    <view style="padding: 20rpx;background: #fff;border-radius: 12rpx">
      <ParserInfo v-if="formSource" :form-content="formSource" :form="formVariables"></ParserInfo>

    </view>
    <view class="show-panel" style="margin-top: 20rpx;">
      <view class="show-col">
        异常备注
      </view>
      <view class="show-col">
        {{ remark }}
      </view>
    </view>
  </view>
</template>

<script>
import ParserInfo from "../../components/ParserInfo/ParserInfo";
export default {
  name: "clockInfo",
  components: {ParserInfo},
  data() {
    return {
      clockInfo: null,
      formSource:null,
      formVariables:null,
      remark:'无'
    }
  },
  onLoad({formData,remark}) {
    this.formData=formData
    console.log("thi2",formData)
    if (remark){
      this.remark=remark
    }
    this.getInfo()
  },
  methods:{
    getInfo(){
      this.apis.securityApi.actMaintainOrderData(this.formData).then(res=>{
        //console.log(res)
        let data=res.data
        let formFields=data.formFields
        formFields.forEach((item,index,arr)=>{
          arr[index] = JSON.parse(item)
        })
        //this.info=res.data
        this.formSource=formFields
        this.formVariables=data.formVariables
        console.log("this.formSource",this.formSource)
      })
    }
  }
}
</script>

<style scoped lang="scss">

</style>
